{% extends "base.html" %}

{% block title %}专注时钟 - 保持专注{% endblock %}

{% block styles %}
<link rel="stylesheet" href="{{ url_for('static', filename='css/timer.css') }}">
{% endblock %}

{% block content %}
<div class="focus-container">
    <div class="timer-section">
        <div class="timer-header">
            <div class="timer-mode">
                <button class="mode-btn active" data-mode="focus">专注</button>
                <button class="mode-btn" data-mode="short-break">短休息</button>
                <button class="mode-btn" data-mode="long-break">长休息</button>
            </div>
        </div>
        
        <div class="timer-display">
            <div class="timer-circle">
                <svg class="timer-svg" viewBox="0 0 100 100">
                    <circle class="timer-background" cx="50" cy="50" r="45"></circle>
                    <circle class="timer-progress" cx="50" cy="50" r="45"></circle>
                </svg>
                <div class="timer-time">25:00</div>
            </div>
            <div class="timer-controls">
                <button id="start-btn" class="control-btn">开始</button>
                <button id="pause-btn" class="control-btn" disabled>暂停</button>
                <button id="reset-btn" class="control-btn" disabled>重置</button>
            </div>
        </div>
    </div>
    
    <div class="sidebar">
        <div class="current-goal">
            <h3>当前目标</h3>
            <div class="goal-selector">
                <select id="goal-select">
                    <option value="">选择目标...</option>
                </select>
                <a href="{{ url_for('main.goals') }}" class="btn-add-goal">+ 新建目标</a>
            </div>
            <div class="goal-info">
                <div class="goal-progress">
                    <div class="progress-bar">
                        <div class="progress-fill" style="width: 0%"></div>
                    </div>
                    <div class="progress-text">0%</div>
                </div>
                <div class="goal-time">
                    <span class="time-completed">0</span> / <span class="time-target">0</span> 分钟
                </div>
            </div>
        </div>
        
        <div class="daily-stats">
            <h3>今日概览</h3>
            <div class="stats-grid">
                <div class="stat-item">
                    <div class="stat-value" id="focus-count">0</div>
                    <div class="stat-label">专注次数</div>
                </div>
                <div class="stat-item">
                    <div class="stat-value" id="focus-time">0</div>
                    <div class="stat-label">专注分钟</div>
                </div>
                <div class="stat-item">
                    <div class="stat-value" id="completed-goals">0</div>
                    <div class="stat-label">完成目标</div>
                </div>
            </div>
        </div>
        
        <div class="recent-activities">
            <h3>最近活动</h3>
            <ul class="activity-list" id="activity-list">
                <!-- 活动列表将通过JS动态加载 -->
            </ul>
        </div>
    </div>
</div>
{% endblock %}

{% block scripts %}
<script src="{{ url_for('static', filename='js/timer.js') }}"></script>
{% endblock %} 